﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">

  <class name="VisualAgile.Model.User, VisualAgile.Model" table="UserAccount"  lazy="true">

    <id name="UserID" column="UserID">
      <generator class="guid.comb"/>
    </id>

    <property name="CreateTime" column="CreateTime"   type="System.DateTime"  />
    <property name="Creator" column="Creator"   type="System.String"  length="32" />
    <property name="Email" column="Email"   type="System.String"  length="255" />

    <property name="Mobile" column="Mobile"   type="System.String"  length="15" />
    <property name="Password" column="Password"   type="System.String"  length="64" />
    <property name="Telephone" column="Telephone"   type="System.String"  length="20" />
    <property name="UserName" column="UserName"  not-null="true" type="System.String"  length="32" />
    <property name="DefaultUser" column="DefaultUser"   type="System.Boolean"  />
    <property name="ValidFrom" column="ValidFrom"   type="System.DateTime"  />
    <property name="ValidTo" column="ValidTo"   type="System.DateTime"   />

    <many-to-one name="Project"
         class="VisualAgile.Model.Project,VisualAgile.Model"
         cascade="none"
         column="ProjectID"
           />

    <many-to-one name="Role"
        class="VisualAgile.Model.Role,VisualAgile.Model"
        cascade="none"
        column="RoleID"
           />

    <set lazy="true" batch-size="6" inverse="false" table="UserMood" access="field.camelcase-underscore" name="Feelings"  >
      <key column="UserID"/>
      <one-to-many class="VisualAgile.Model.Feelings, VisualAgile.Model" />
    </set>

    
    <!-- fetch="join" inverse="false" cascade="all"-->
  </class>



</hibernate-mapping>

